#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>


  byte buf[256],
	     data;

  long posi,
	     ofs;

  int  c;
  word val;

	FILE *tf,
	     *cf;

int main( )
{

  tf = fopen( "c:/romhack/trans/free6/bin/zitz.nes","rb");
  cf = fopen( "c:/romhack/trans/free6/bin/zitz.datx","wb");

  if ( !tf || !cf ) return -1;
  //
  fseek( tf, 0, SEEK_END );
  posi = ftell( tf );
  fseek( tf, 0, SEEK_SET );
  //
  c = -1;
  //
  while( ++c < posi )
  {
    data = fgetc( tf );
    fputc( 0xFF ^ data, cf );
  }


  fcloseall( );
  return 0;
}

